#ifndef RECEVERDIALOG_H
#define RECEVERDIALOG_H

#include <QDialog>
#include <QUdpSocket>

QT_BEGIN_NAMESPACE
namespace Ui { class ReceverDialog; }
QT_END_NAMESPACE

class ReceverDialog : public QDialog
{
    Q_OBJECT

public:
    ReceverDialog(QWidget *parent = nullptr);
    ~ReceverDialog();

private slots:
    //点击开始接收按钮的槽函数
    void on_pushButton_clicked();
    //接受广播消息的槽函数
    void messageRecevied ();

private:
    Ui::ReceverDialog *ui;
    QUdpSocket *udpsocket;
    quint16  port;
    bool isStarted; //标记, 开始/停止接受
};
#endif // RECEVERDIALOG_H







